home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 February: Technology Seed / Mac Tech Seed Feb '97.toast / OpenDoc 1.2b2c1 / OpenDoc / Interfaces / CPlusPlus / DragDrp.xh < prev    next >
Encoding:
Text File  |  1997-02-13  |  8.4 KB  |  344 lines  |  [TEXT/MPS ]

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: DragDrp.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.18
  7.  *     SOM Emitter emitxh.dll: 2.33
  8.  */
  9.  
  10. /*
  11.  * 
  12.  *  Classes defined in this interface
  13.  * 
  14.  */
  15.  
  16.  
  17. #ifndef SOM_ODDragAndDrop_xh
  18. #define SOM_ODDragAndDrop_xh
  19.  
  20. class ODDragAndDrop;
  21.  
  22. #define ODDragAndDrop_MajorVersion 1
  23. #define ODDragAndDrop_MinorVersion 0
  24.  
  25. /*
  26.  * Passthru lines: File: "C.xh", "before"
  27.  */
  28.  
  29. #ifndef __DRAG__
  30. #include <Drag.h>
  31. #endif
  32.  
  33.  
  34. /* C++ SOM defs */
  35. #include <somcls.xh>
  36. #include <somcm.xh>
  37.  
  38. /* C++ parent defs */
  39. #ifndef SOM_ODObject_xh
  40. #include <ODObject.xh>
  41. #endif
  42.  
  43. #ifndef ODDragAndDrop_API
  44. #define ODDragAndDrop_API
  45. /*
  46.  * -- The Class API
  47.  */
  48.  
  49. /*
  50.  * Start of user-defined types:
  51.  */
  52. class SOMClass;
  53. class SOMObject;
  54. class ODFrame;
  55. class ODFacet;
  56. class ODObject;
  57. class ODExtension;
  58. class ODDragAndDrop;
  59. class ODSession;
  60. class ODPart;
  61. class ODStorageUnit;
  62. class ODStorageSystem;
  63. class ODContainer;
  64. class ODWindow;
  65. class ODWindowState;
  66. class ODDragItemIterator;
  67. class ODStorageUnitView;
  68. class ODDraft;
  69.  
  70. /*
  71.  * End of user-defined types.
  72.  */
  73.  
  74. #ifdef OLDIBMSOMAPISUPPORT
  75. #define ODDragAndDropCClassData ODDragAndDropClassData
  76. #define ODDragAndDropNewClass(major,minor) somNewVersionedClassReference(ODDragAndDrop,major,minor)
  77. #endif
  78.  
  79. /* define xxxMetaClass macro to facilitate (cls ## MetaClass) */
  80. #define ODDragAndDropMetaClass SOMClass
  81.  
  82. #if PRAGMA_ALIGN_SUPPORTED
  83. #  pragma options align=power
  84. #endif
  85.  
  86. /* The API to the ODDragAndDrop class object, and the methods it introduces. */
  87. SOMEXTERN struct ODDragAndDropClassDataStructure {
  88. #ifdef OLDIBMSOMAPISUPPORT
  89.     SOMClass            *classObject;    /* always zero, use somNewClassReference instead */
  90. #else
  91.     long zero;
  92. #endif
  93.     somStaticClassInfo *sci;
  94.     somDToken        instanceDataToken;
  95.     long reserved [3];
  96.     somMToken Clear;
  97.     somMToken GetContentStorageUnit;
  98.     somMToken StartDrag;
  99.     somMToken ShowPasteAsDialog;
  100.     somMToken GetDragAttributes;
  101.     somMToken GetDragReference;
  102.     somMToken CreateDragItemIterator;
  103.     somMToken reserved1;
  104.     somMToken reserved2;
  105.     somMToken reserved3;
  106.     somMToken reserved4;
  107.     somMToken reserved5;
  108.     somMToken reserved6;
  109.     somMToken reserved7;
  110.     somMToken reserved8;
  111.     somMToken reserved9;
  112.     somMToken reserved10;
  113.     somMToken reserved11;
  114.     somMToken reserved12;
  115.     somMToken reserved13;
  116.     somMToken reserved14;
  117.     somMToken reserved15;
  118.     somMToken reserved16;
  119.     somMToken reserved17;
  120.     somMToken reserved18;
  121.     somMToken reserved19;
  122.     somMToken reserved20;
  123.     somMToken reserved21;
  124.     somMToken reserved22;
  125.     somMToken reserved23;
  126.     somMToken reserved24;
  127.     somMToken reserved25;
  128.     somMToken reserved26;
  129.     somMToken reserved27;
  130.     somMToken reserved28;
  131.     somMToken reserved29;
  132.     somMToken reserved30;
  133.     somMToken reserved31;
  134.     somMToken reserved32;
  135.     somMToken reserved33;
  136. } SOMDLINK ODDragAndDropClassData;
  137.  
  138. #if PRAGMA_ALIGN_SUPPORTED
  139. #  pragma options align=reset
  140. #endif
  141.  
  142. #if !defined(ODDragAndDrop_Class_Source) && !defined(SOM_Module_dragdrp_Source)
  143. #if PRAGMA_IMPORT_SUPPORTED
  144. #pragma import list ODDragAndDropClassData
  145. #endif
  146. #endif
  147.  
  148.  
  149. /*
  150.  * -- Typedefs and inline method declarations for left path inherited methods
  151.  * -- are omitted because this compilation had -museinheritedmethods in effect
  152.  */
  153.  
  154.  
  155. /*
  156.  * -- Typedefs for ODDragAndDrop Method Procedures
  157.  */
  158. SOMEXTERN {
  159. typedef void   (* SOMLINK somTD_ODDragAndDrop_Clear)(ODDragAndDrop *somSelf, Environment *ev);
  160. typedef ODStorageUnit*   (* SOMLINK somTD_ODDragAndDrop_GetContentStorageUnit)(ODDragAndDrop *somSelf, Environment *ev);
  161. typedef ODDropResult   (* SOMLINK somTD_ODDragAndDrop_StartDrag)(ODDragAndDrop *somSelf, Environment *ev,
  162.         ODFrame* srcFrame,
  163.         ODType imageType,
  164.         ODByteArray* image,
  165.         ODPart** destPart,
  166.         ODByteArray* refCon);
  167. typedef ODBoolean   (* SOMLINK somTD_ODDragAndDrop_ShowPasteAsDialog)(ODDragAndDrop *somSelf, Environment *ev,
  168.         ODBoolean canPasteLink,
  169.         ODPasteAsMergeSetting mergeSetting,
  170.         ODFacet* facet,
  171.         ODTypeToken viewType,
  172.         ODStorageUnit* contentSU,
  173.         ODPasteAsResult* theResult);
  174. typedef ODULong   (* SOMLINK somTD_ODDragAndDrop_GetDragAttributes)(ODDragAndDrop *somSelf, Environment *ev);
  175. typedef ODPlatformDragReference   (* SOMLINK somTD_ODDragAndDrop_GetDragReference)(ODDragAndDrop *somSelf, Environment *ev);
  176. typedef ODDragItemIterator*   (* SOMLINK somTD_ODDragAndDrop_CreateDragItemIterator)(ODDragAndDrop *somSelf, Environment *ev,
  177.         ODPlatformDragReference dragRef,
  178.         ODULong startDragItemRef,
  179.         ODULong endDragItemRef);
  180. }
  181.  
  182. #endif /* ODDragAndDrop_API */
  183.  
  184.  
  185. /*
  186.  * -- This emitter treats Method Tokens as Thunks by default.
  187.  * -- Use the sc modifier "nothunks" to change this default
  188.  */
  189. #undef somresolve_
  190. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  191.  
  192. /*
  193.  * -- The C++ Wrapper Class for ODDragAndDrop
  194.  */
  195. class ODDragAndDrop : public ODObject
  196. {
  197. public:
  198.  
  199. // ODDragAndDrop::new registers use of the class object, and then uses somNew
  200. // to allocate memory and load the object method table pointer. 
  201. void *operator new(size_t size)
  202. {
  203.     SOM_IgnoreWarning(size);
  204.     // Allocate memory using the default allocator for ODDragAndDrop, and
  205.     // clear mem & set method table pointer, call basic initialization
  206. #ifdef SOMCHKNULL
  207.     void * __somResult = (void *)
  208.       somNewObject(ODDragAndDrop);
  209.     SOMCHKNULL(__somResult);
  210.     return __somResult;
  211. #else
  212.     return (void*) somNewObject(ODDragAndDrop);
  213. #endif
  214. }
  215.  
  216. // ODDragAndDrop::delete uses the default deallocator for the object's class.
  217. void operator delete(void * obj)
  218. {
  219.     if (obj) {
  220.         SOM_Resolve(obj,SOMObject,somFree)
  221.            ( (SOMObject*) obj );
  222.     }
  223. }
  224.  
  225. /* method: Clear */
  226. void   Clear(Environment *ev)
  227. {
  228.    SOM_ResolveD(this,ODDragAndDrop,ODDragAndDrop,Clear)
  229.     (this,ev);
  230. #ifdef SOMCHKEXCEPT
  231.       SOMCHKEXCEPT;
  232. #endif
  233. }
  234.  
  235. /* method: GetContentStorageUnit */
  236. ODStorageUnit*   GetContentStorageUnit(Environment *ev)
  237. {
  238.    #ifdef SOMCHKEXCEPT
  239.    ODStorageUnit* __somResult = 
  240.       SOM_ResolveD(this,ODDragAndDrop,ODDragAndDrop,GetContentStorageUnit)
  241.     (this,ev);
  242.       SOMCHKEXCEPT;
  243.    return __somResult;
  244. #else
  245.    return SOM_ResolveD(this,ODDragAndDrop,ODDragAndDrop,GetContentStorageUnit)
  246.     (this,ev);
  247. #endif
  248. }
  249.  
  250. /* method: StartDrag */
  251. ODDropResult   StartDrag(Environment *ev,
  252.         ODFrame* srcFrame,
  253.         ODType imageType,
  254.         ODByteArray* image,
  255.         ODPart** destPart,
  256.         ODByteArray* refCon)
  257. {
  258.    #ifdef SOMCHKEXCEPT
  259.    ODDropResult __somResult = 
  260.       SOM_ResolveD(this,ODDragAndDrop,ODDragAndDrop,StartDrag)
  261.     (this,ev,srcFrame,imageType,image,destPart,refCon);
  262.       SOMCHKEXCEPT;
  263.    return __somResult;
  264. #else
  265.    return SOM_ResolveD(this,ODDragAndDrop,ODDragAndDrop,StartDrag)
  266.     (this,ev,srcFrame,imageType,image,destPart,refCon);
  267. #endif
  268. }
  269.  
  270. /* method: ShowPasteAsDialog */
  271. ODBoolean   ShowPasteAsDialog(Environment *ev,
  272.         ODBoolean canPasteLink,
  273.         ODPasteAsMergeSetting mergeSetting,
  274.         ODFacet* facet,
  275.         ODTypeToken viewType,
  276.         ODStorageUnit* contentSU,
  277.         ODPasteAsResult* theResult)
  278. {
  279.    #ifdef SOMCHKEXCEPT
  280.    ODBoolean __somResult = 
  281.       SOM_ResolveD(this,ODDragAndDrop,ODDragAndDrop,ShowPasteAsDialog)
  282.     (this,ev,canPasteLink,mergeSetting,facet,viewType,contentSU,theResult);
  283.       SOMCHKEXCEPT;
  284.    return __somResult;
  285. #else
  286.    return SOM_ResolveD(this,ODDragAndDrop,ODDragAndDrop,ShowPasteAsDialog)
  287.     (this,ev,canPasteLink,mergeSetting,facet,viewType,contentSU,theResult);
  288. #endif
  289. }
  290.  
  291. /* method: GetDragAttributes */
  292. ODULong   GetDragAttributes(Environment *ev)
  293. {
  294.    #ifdef SOMCHKEXCEPT
  295.    ODULong __somResult = 
  296.       SOM_ResolveD(this,ODDragAndDrop,ODDragAndDrop,GetDragAttributes)
  297.     (this,ev);
  298.       SOMCHKEXCEPT;
  299.    return __somResult;
  300. #else
  301.    return SOM_ResolveD(this,ODDragAndDrop,ODDragAndDrop,GetDragAttributes)
  302.     (this,ev);
  303. #endif
  304. }
  305.  
  306. /* method: GetDragReference */
  307. ODPlatformDragReference   GetDragReference(Environment *ev)
  308. {
  309.    #ifdef SOMCHKEXCEPT
  310.    ODPlatformDragReference __somResult = 
  311.       SOM_ResolveD(this,ODDragAndDrop,ODDragAndDrop,GetDragReference)
  312.     (this,ev);
  313.       SOMCHKEXCEPT;
  314.    return __somResult;
  315. #else
  316.    return SOM_ResolveD(this,ODDragAndDrop,ODDragAndDrop,GetDragReference)
  317.     (this,ev);
  318. #endif
  319. }
  320.  
  321. /* method: CreateDragItemIterator */
  322. ODDragItemIterator*   CreateDragItemIterator(Environment *ev,
  323.         ODPlatformDragReference dragRef,
  324.         ODULong startDragItemRef,
  325.         ODULong endDragItemRef)
  326. {
  327.    #ifdef SOMCHKEXCEPT
  328.    ODDragItemIterator* __somResult = 
  329.       SOM_ResolveD(this,ODDragAndDrop,ODDragAndDrop,CreateDragItemIterator)
  330.     (this,ev,dragRef,startDragItemRef,endDragItemRef);
  331.       SOMCHKEXCEPT;
  332.    return __somResult;
  333. #else
  334.    return SOM_ResolveD(this,ODDragAndDrop,ODDragAndDrop,CreateDragItemIterator)
  335.     (this,ev,dragRef,startDragItemRef,endDragItemRef);
  336. #endif
  337. }
  338.  
  339. };   /* ODDragAndDrop */
  340.  
  341.  
  342.  
  343. #endif       /* SOM_ODDragAndDrop_xh */
  344.